#!/bin/bash

clear
echo "EXECUTING INIT ..."

if [[ -f /etc/sysconfig/lsb-functions ]]; then
    . /etc/sysconfig/lsb-functions
fi

mkdir -p /{dev,proc,sys,etc,var,lib,lib64,tmp,usr,root,mnt}
mkdir -p /dev/{shm,pts}
mkdir -p /var/{log,run,lib,lock,db,spool,opt,empty,www}
mkdir -p /var/lock/subsys
mkdir -p /var/run/netreport
mkdir -p /var/lib/{rpm,dhclient}
mkdir -p /home/admin
mkdir -p /usr/share

echo "MOUNT PROC, SYSFS, DEVPTS"
mount -t proc proc /proc
mount -t sysfs sys /sys
mount -t devpts devpts /dev/pts
mount -t tmpfs tmpfs /dev/shm

/sbin/start_udev 2>/dev/null

export CONSOLETYPE=tty1
export NOLOCALE=1

echo "EXECUTING REAL INIT"
exec /sbin/init
